<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html>
<head>
	<meta charset='utf-8' /> 
	<title>国网云盘系统</title>
	<style>
		.cursers{cursor:pointer}
	</style>
</head>
<body style='background:#ddd;padding:0px;margin:0px;padding-left:10px'>
	<div style='border:0px solid;font:normal normal 12px/30px normal'>
		<div style='float:left' class='cursers'>
			<span style='color:#229;' onclick='location.href="share_me.html"'>我的共享</span>　
			<span style='color:#229' onclick='_jumpShareAll()'>全部共享</span>
		</div>
		<div style='float:right;padding-right:10px'>
			<span onclick='location.href="password.html"' class='cursers'>
				<span >当前账号：<span style='color:#229' id='account'>a</span>　</span>
				使用人：<span style='color:#229' id='name'>a</span>　
			</span>
			空间：<span style='color:#229'><span id='ucapacity'></span> / <span id='capacity'></span></span>　
			<span style='color:blue' class='cursers' onclick='exit()'>退出</span>　
		</div>
		<div style='clear:both'></div>
	</div>

	<div>
		<h1 style='text-align:center'>云盘文件管理</h1>		
	</div>

	<div style='border:0px solid;'>
		<div style='float:left'>
			<div id='btnArea'>
				<button id='createDir'>创建目录</button>
				<button id='uploadFile'>上传文件</button>
				<!--button id='refresh'  onclick='alert(sessionStorage.token1)'>刷新缓存</button-->
			</div>
	
			<div style='display:none' id='createDirArea'>
				<input type="text" id='createDirName' />
				<button id='createDirBtn' >提交</button>
				<button class='btnAreaBack'>返回</button>
			</div>

			<div style='display:none' id='uploadFileArea'>
				<form id='upload_form' action='../interface/before_interface.php' method='post' enctype="multipart/form-data">
					<input type="file" name='upFile' id='upFile' multiple />
					<input type="hidden" name='token1' />
					<input type="hidden" name='dirId' />
					<input type="hidden" name='account' />
					<input type="hidden" name='type'/>
					<button type='button' id='upBtn'>提交</button>
					<button type='button' class='btnAreaBack'>返回</button>
				</form>
			</div>
		</div>

		<div style='float:right;padding-right:10px'>
			<input type="text" placeholder='输入文件名搜索' id='searchInp' />
			<button id='searchBtn'>搜索</button>
		</div>
		<div style='clear:both'></div>
	</div>

	<div style='margin:20px auto'>
		当前目录：
		<span style='color:blue' id='dirPath'>/aa/bb/cc/dd</span>　
		<button onclick='_backParent()' id='parentDir'>返回上层</button>
	</div>

	<div>
		<div id='dirList'>
			<!--div style='border:0px solid;padding:5px 0'>
				<div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'></div>
				<div style='float:left'><img src="../public/dir.png" style='height:35px;width:35px' /></div>
				<div style='float:left'>　　
					<span style='line-height:35px'>aaa</span>　　
					<button>删除</button>
				</div>
				<div style='clear:both'></div>
			</div-->
		</div>


		<div id='fileList'>
			<!--div style='border:0px solid;padding:5px 0'>
				<label><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'><input type="checkbox" /></div></label>

				<div style='float:left'><img src="../public/img.png" style='height:35px;width:35px' /></div>
				<div style='float:left'>　　
					<span style='line-height:35px'>aaa</span>　　
					<span style='line-height:35px'>47.57KB</span>　　
					<button>下载</button>　
					<button>共享</button>　
					<button>删除</button>
				</div>
				<div style='clear:both'></div>
			</div>
			<div style='border:0px solid;padding:5px 0'>
				<label><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'><input type="checkbox" /></div></label>
				<div style='float:left'><img src="../public/file.png" style='height:35px;width:35px' /></div>
				<div style='float:left'>　　
					<span style='line-height:35px'>aaa</span>　　
					<span style='line-height:35px'>47.57KB</span>　　
					<button>下载</button>　
					<button>共享</button>　
					<button>删除</button>
				</div>
				<div style='clear:both'></div>
			</div-->
		</div>
	</div>

	<div style='margin:30px auto' id='selectBtnArea'>
		<label><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'></div></label>
		<button id='selectAll'>全选</button>
		<button id='selectRev'>反选</button>
		<button id='delSelect'>删除选中</button>
	</div>


	<div id='fpage' style='text-align:center'></div>

	<div id='moveDirList' style='display:none;width:100%;height:100%;border:0px solid;position:fixed;top:0px;left:0px;background:rgba(92,92,92,.5);font-size:12px;color:#666;'>
		<div style='background:#fff;border-radius:5px;height:300px;width:500px;margin:100px auto;border:0px solid #777;'>
			<div style='background:#eff;line-height:40px;padding-left:10px;border-bottom:1px solid #ccc'>移动到</div>

			<!--目录列表-->
			<div style='height:200px;width:480px;margin:2px auto;border:1px solid #eee;line-height:30px;overflow-y:auto;overflow-x:auto' id='moveDirListContent'>
				
				<div style='width:100;border:1px solid'>
					<div style='background:#fff;border:0px solid;height:35px'><img style='float:left;width:15px;height:15px;margin:10px' src="../public/zk.png" alt="" /><img style='float:left;width:25px;height:25px;margin-top:3px' src="../public/dir.png" alt="" /><span style='float:left;margin-left:30px'>aa</span><span style='clear:both'></span></div>
					<div style='padding-left:30px;'>aa</div>
				</div>
			</div>

			<div style='background:#fff;padding:10px;border:0px solid #ccc'>
			
				<div style='float:right;border:1px solid #aaf;color:#77f;padding:7px 29px;border-radius:4px' id='cancelMoveDirList'>取消</div>
				<div style='float:right;border:1px solid #aaf;color:#77f;padding:7px 29px;border-radius:4px;margin-right:10px' onclick='_moveFileTo()'>确定</div>
				<div style='clear:both'></div>
			</div>
		</div>
	</div>
</body>
</html>
<script src='../public/jquery1.1.js'></script>
<script src='../public/fun.js'></script>
<script>
_checkExit();	//检测账号异常强制退出

if(!sessionStorage.curruntMoveParentId){
	sessionStorage.curruntMoveParentId = 0;	//移动目录操作的当前父id
}

var dirList = '';	//记录目录列表信息
var moveDirListData = ''; //记录移动目录时的目录列表
var moveId;		//要移动的文件或目录id
var moveToId;	//要移动到目录的id

if(!sessionStorage.curruntDirPath){	//记录当前目录路径
	sessionStorage.curruntDirPath = '/';
}

$('#dirPath').text(sessionStorage.curruntDirPath);	//显示当前目录路径

//记录当前目录id
if(parseInt(sessionStorage.currentDirId) > 0){
	$('#parentDir').show();
}else{
	sessionStorage.currentDirId = 0;
	$('#parentDir').hide();
}

//记录父目录id
if(!sessionStorage.parentDirId){
	sessionStorage.parentDirId = 0;
}

//记录搜索值
if(sessionStorage.search){
	$('#searchInp').val(sessionStorage.search);
}



//返回上级目录
function _backParent(){

	var parent = sessionStorage.parentDirId;
	if(parent == 0){
		_jumpDir(0,0,'/');
	}else{
		for(var i=0;i<dirList.length;i++){
			if(dirList[i].id == parent){
				_jumpDir(dirList[i].parent,dirList[i].id,dirList[i].path);
			}
		}
	}
}


//跳转到指定目录
function _jumpDir(parentDirId,currentDirId,currentDirPath){
	sessionStorage.parentDirId  = parentDirId;
	sessionStorage.currentDirId = currentDirId;
	sessionStorage.curruntDirPath  = currentDirPath;
	location.reload();
}



//获取文件目录列表
function _getDirList(){
	var view = 0;
	$('#selectBtnArea').show();
	if(sessionStorage._getDirList){
		if(view)A('_getDirList sess');
		_parseList(JSON.parse(sessionStorage._getDirList));
		return;
	}

	var cachePath = '../cache/user_file_list/' + sessionStorage.account;
	Ajax({},function(cache){
		var after_stat = false;
		if(!cache || !/^{.*}$/.test(cache)){
			after_stat = true;
		}else{
			var tmp_cache = JSON.parse(cache);
			if(tmp_cache.data){
				if(view)A('_getDirList cache');
				_parseList(tmp_cache.data);
				sessionStorage._getDirList = JSON.stringify(tmp_cache.data);
			}else{
				after_stat = true;
			}
		}
		if(after_stat){
			if(view)A('_getDirList after');
			var data = {
				type:'_getDirList',
				parent:sessionStorage.currentDirId
			}

			AjaxBefore(data,function(res){
				var tmp = _checkJsonFormat(res); //检测JSON格式
				_parseList(tmp.data);
				sessionStorage._getDirList = JSON.stringify(tmp.data);
			})
		}
	},cachePath,1);
}

function _parseList(res){
	if(typeof(res) != 'object' || res.length < 0){
		return;
	}
	dirList = res;	//将目录列表记录到页面变量中
	var str_dir = '';
	var str_file = '';
	if(sessionStorage.search){		//有搜索值
		for(var i=0;i<res.length;i++){
			var fname = res[i].fname;
			if(res[i].type == 'file'){
				if(res[i].share == 'yes'){
					var share_str = "<button onclick=_shareFile("+ res[i].id +",1)>删除共享</button>";
				}else{
					var share_str = "<button onclick=_shareFile("+ res[i].id +")>共享</button>";
				}
				var p = eval('/'+sessionStorage.search+'/');
				if(p.test(res[i].fname)){
					var size = _getSize(res[i].size);
					var ctime = StampToYmd(parseFloat(res[i].ctime)*1000);
					str_file += "<div style='border:0px solid;padding:5px 0'><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'></div><div style='float:left'><label><input type='checkbox' value='"+res[i].id+"|||||-----|||||"+res[i].path+"'  /><img src='../public/file.png' style='height:35px;width:35px' align='top'/></label>　　<span style='line-height:35px'>" + fname + "</span></label>　　<span style='font-size:12px;color:#88a'>" + size + "</span>　<span style='font-size:12px;color:#88f'>" + ctime + "</span>　<button onclick=_download('"+res[i].path+"','"+res[i].fname+"')>下载</button>　<button onclick=_moveFile("+ res[i].id +")>移动</button>　<button onclick=_delFile('file',"+ res[i].id +",'"+res[i].path+"')>删除</button>　"+share_str+"</div><div style='clear:both'></div></div>";
				}
			}
		}
		$('#dirList').html('');
		$('#fileList').html(str_file);
	}else{
		for(var i=0;i<res.length;i++){
			var fname = res[i].fname;
			if(res[i].parent == sessionStorage.currentDirId){
				if(res[i].type == 'dir'){
					str_dir += "<div style='border:0px solid;padding:5px 0'><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'></div><div style='float:left;margin-left:20px'><label onclick=_jumpDir(" + res[i].parent + "," + res[i].id + ",'" + res[i].path + "')><img src='../public/dir.png' style='height:35px;width:35px' align='top'/>　　<span style='line-height:35px'>" + fname + "</span></label>　<button onclick=_moveFile("+ res[i].id +")>移动</button>　<button onclick=_delFile('dir',"+ res[i].id +",'"+res[i].path+"')>删除</button></div><div style='clear:both'></div></div>";
				}else{
					var fileShow = true;
					if(res[i].share == 'yes'){
						var share_str = "<button onclick=_shareFile("+ res[i].id +",1)>删除共享</button>";
					}else{
						var share_str = "<button onclick=_shareFile("+ res[i].id +")>共享</button>";
					}

					var size = _getSize(res[i].size);
					var ctime = StampToYmd(parseFloat(res[i].ctime)*1000);

					str_file += "<div style='border:0px solid;padding:5px 0'><div style='border:0px solid;width:40px;height:35px;float:left;padding-top:7px'></div><div style='float:left'><label><input type='checkbox' value='"+res[i].id+"|||||-----|||||"+res[i].path+"' /><img src='../public/file.png' style='height:35px;width:35px' align='top'/></label>　　<span style='line-height:35px'>" + fname + "</span></label>　　<span style='font-size:12px;color:#88a'>" + size + "</span>　<span style='font-size:12px;color:#88f'>" + ctime + "</span>　<button onclick=_moveFile("+ res[i].id +")>移动</button>　<button onclick=_download('"+res[i].path+"','"+res[i].fname+"')>下载</button>　<button onclick=_delFile('file',"+ res[i].id +",'"+res[i].path+"')>删除</button>　"+share_str+"</div><div style='clear:both'></div></div>";
				}
			}
		}
		if(!fileShow){
			$('#selectBtnArea').hide();
		}
		$('#dirList').html(str_dir);
		$('#fileList').html(str_file);
	}

}


//移动文件或目录
function _moveFile(id){
	var view = 0;
	moveId = id;
	if(sessionStorage.moveDirListData){
		if(view)C('_getMoveDirList sess');
		moveDirListData = JSON.parse(sessionStorage.moveDirListData);
		_parseMoveDirList(moveDirListData);
		return;
	}
	var data = {
		type:'_getMoveDirList',
	}
	AjaxBefore(data,function(res){
		if(view)C('_getMoveDirList after');
		var tmp = _checkJsonFormat(res); //检测JSON格式
		if(tmp.stat == 'err2'){
			A('还没有任何目录！');return;
		}
		moveDirListData = tmp.data;
		sessionStorage.moveDirListData = JSON.stringify(tmp.data);
		_parseMoveDirList(moveDirListData);
	});
}


//解析移动目录列表
function _parseMoveDirList(data){
	var str = '';
	str += "<div><div class='item' style='cursor:pointer;background:#fff;border:0px solid;height:35px'><img onclick=_pullDirList(0,this) style='float:left;width:15px;height:15px;margin:10px' src='../public/zk.png' alt='' /><img style='float:left;width:25px;height:25px;margin-top:3px' src='../public/dir.png' alt=''  onclick='_selectItem(this,0)'/><span onclick='_selectItem(this,0)' style='float:left;padding:0 30px'>根目录</span><span style='clear:both'></span></div><div style='padding-left:30px;'></div></div>";
	$('#moveDirList').show();
	$('#moveDirListContent').html(str);
}

//点击展开移动的目录列表
function _pullDirList(index,o){
	if($(o).attr('src') == ''){
		return;
	}
	if($(o).attr('src') != '../public/zk.png'){
		$(o).attr('src','../public/zk.png');
		$(o).parent().next('div').hide();
		return;
	}
	$(o).parent().next('div').show();
	var str2 = '';
	for(var i in moveDirListData){
		if(index == i){
			for(var j = 0;j<moveDirListData[i].data.length;j++){
				if(moveId == moveDirListData[i].data[j].id){
					continue;	//越过相同目录
				}
				//判断是否有子目录
				if(moveDirListData[moveDirListData[i].data[j].id]){
					var tmpSrc = '../public/zk.png';
				}else{
					var tmpSrc = '';
				}
				str2 += "<div><div class='item' style='cursor:pointer;background:#fff;border:0px solid;height:35px'><img onclick=_pullDirList("+ moveDirListData[i].data[j].id +",this) style='float:left;width:15px;height:15px;margin:10px' src='"+ tmpSrc +"' alt='' /><img style='float:left;width:25px;height:25px;margin-top:3px' src='../public/dir.png' alt=''  onclick='_selectItem(this,"+ moveDirListData[i].data[j].id +")'/><span onclick='_selectItem(this,"+ moveDirListData[i].data[j].id +")' style='float:left;padding:0 30px'>"+ moveDirListData[i].data[j].fname +"</span><span style='clear:both'></span></div><div style='padding-left:30px;'></div></div>";
			}
		}
	}
	$(o).parent().next('div').html(str2);
	$(o).attr('src','../public/ss.png');
}

//选择要移动到的目录id
function _selectItem(o,id){
	moveToId = id;
	$('.item').css('background','#fff');
	$(o).parent().css('background','#eef');
}

//移动文件或目录的提交
function _moveFileTo(){
	if(!confirm('确认移动操作？')){
		return;
	}
	var data = {
		type:'_moveFileTo',
		moveId:moveId,
		moveToId:moveToId
	}
	AjaxBefore(data,function(res){
		var tmp = _checkJsonFormat(res); //检测JSON格式
		if(tmp.stat == 'ok'){
			A('操作成功！');
			_clearSessData();	//清除相关sess缓存数据
			location.reload();
		}else{
			A('操作失败！');
		}
	});	
}


//取消移动文件或目录
$('#cancelMoveDirList').click(function(){
	moveId = '';
	moveToId = '';
	$('#moveDirList').hide();
});




//删除文件
function _delFile(ftype,fid,path){
	if(!confirm('确认删除？')){
		return;
	}
	if(!ftype || !fid || !path){
		A('缺少参数！');return;
	}
	var data = {
		type:'delFile',
		ftype:ftype,
		fid:fid,
		path:path
	}
	AjaxBefore(data,function(res){
		var tmp = _checkJsonFormat(res); //检测JSON格式
		if(tmp.stat == 'ok'){
			A('删除成功！');
			_clearSessData();	//清除相关sess缓存数据
			location.reload();return;
		}

		if(tmp.stat == 'err3'){
			A('目录不为空！');
			location.reload();return;
		}
		A('删除失败！');
	});
}

 $(function(){
	//当用IE时，显示提示框内容，并清空提示缓存
	if(sessionStorage.alert){
		A(sessionStorage.alert);
		sessionStorage.alert = '';
	}

	//填充账号和姓名
	$('#account').text(sessionStorage.account);
	$('#name').text(sessionStorage.name);

	//获取文件目录列表
 	_getDirList();




 	//搜索
 	$('#searchBtn').click(function(){
		sessionStorage.parentDirId = 0;
		sessionStorage.currentDirId = 0;
		sessionStorage.curruntDirPath = '/';
 		var search = m_trim($('#searchInp').val());
 		sessionStorage.search = search;
 		location.reload();
 	});




	//创建目录和上传文件功能
	$('#createDir').click(function(){
		$('#btnArea').hide();
		$('#createDirArea').show();
	});

	$('#uploadFile').click(function(){
		$('#btnArea').hide();
		$('#uploadFileArea').show();
	});

	$('.btnAreaBack').click(function(){
		$('#btnArea').show();
		$('#createDirArea,#uploadFileArea').hide();
	});


	//创建目录
	$('#createDirBtn').click(function(){
		var dirName = m_trim($('#createDirName').val());
		if(!dirName){
			return;
		}

		if(!_checkChar(dirName)){
			A('非法字符！');return;
		}

		if(sessionStorage.curruntDirPath == '/'){
			var path = sessionStorage.curruntDirPath + dirName;
		}else{
			var path = sessionStorage.curruntDirPath + '/' + dirName;
		}
		var data = {
			type:'createDir',
			dirName:dirName,
			path:path,
			parent:sessionStorage.currentDirId
		}
		AjaxBefore(data,function(res){
			var tmp = _checkJsonFormat(res); //检测JSON格式
			sessionStorage.token1 = tmp.token1;
			switch(tmp.stat){
				case 'err1':A('缺少参数！');break;
				case 'err2':A('目录已存在！');break;
				case 'err3':A('创建目录失败！');break;
				case 'err4':A('非法字符！');break;
				case 'ok':
					$('#createDirName').val('');
					A('目录创建成功！');
					_clearSessData();	//清除相关sess缓存数据
					location.reload();
					break;
			}
		});
	});












	//文件上传
	$('#upBtn').click(function(){
		Notice('文件上传中......');
		var browser=navigator.appName;
		if(browser=="Microsoft Internet Explorer"){	//如果是IE浏览器
			_clearSessData();	//清除相关sess缓存数据
			$('input[name=account]').val(sessionStorage.account);
			$('input[name=token1]').val(sessionStorage.token1);
			$('input[name=dirId]').val(sessionStorage.currentDirId);
			$('input[name=type]').val('upload');
			var fileVal = $('input[type=file]').val();
			if(!fileVal){
				Notice();
				A('请选择上传文件！');
				return;
			}
			$('#upload_form').submit();
		}else{		//非ie浏览器
			var file = document.getElementById('upFile').files;
			if(file.length >= 0){
				if(file.length > 20){
					Notice();
					A('文件数不得大于20个！');
					return;
				}
				var fd = new FormData();
				fd.append('type','upload');
				fd.append('account',sessionStorage.account);
				fd.append('token1',sessionStorage.token1);
				fd.append('dirId',sessionStorage.currentDirId);
				var curruntSize = 0;
				for(var i=0;i<file.length;i++){
					fd.append('upFile'+i,file[i]);
					curruntSize += file[i].size;
				}

				//判断上传文件是否超限
				if(curruntSize > parseFloat(sessionStorage.ulimit2)){
					Notice();
					A('上传文件大小超限！');
					return;
				}

				if(curruntSize + parseFloat(sessionStorage.useCapacity2) > parseFloat(sessionStorage.capacity2)){
					Notice();
					A('空间容量不足！');
					return;
				}
				$.ajax({
				    url:before_interface,
				    type: 'POST',
				    data:fd,
				    processData: false,
				    contentType: false,
				    success : function(res) {
						Notice();
				    	document.getElementById('upFile').value='';
						var tmp = _checkJsonFormat(res); //检测JSON格式
						if(tmp.stat == 'err2'){
							A('请选择文件！');return;
						}
						if(tmp.stat == 'err3'){
							A('上传的文件已存在！');return;
						}
						if(tmp.stat == 'err4'){
							A('上传文件大小超限！');return;
						}
						if(tmp.stat == 'err5'){
							A('文件总容量超限！');return;
						}
						if(tmp.stat == 'err6'){
							A('非法字符2！');return;
						}
						var err_arr = [];
						for(var i=0;i<tmp.stat.length;i++){
							if(tmp.stat[i][1] != 'ok'){
								err_arr.push(tmp.stat[i][0]);
							}
						}
						if(err_arr.length > 0){
							A('文件" '+err_arr.join(' ，')+' "上传失败!');
						}else{
							A('上传成功！');
							_clearSessData();	//清除相关sess缓存数据
							location.reload();
						}
				    }
				});
			}else{
				Notice();
				A('请选择上传文件！');
			}
		}
 	});



	//全选
	$('#selectAll').click(function(){
		$('input[type=checkbox]').each(function(i,v){
			v.checked = true;
		});
	});
	//反选
	$('#selectRev').click(function(){
		$('input[type=checkbox]').each(function(i,v){
			v.checked = v.checked?false:true;
		});
	});

	//删除选中文件
	$('#delSelect').click(function(){
		if(!confirm('确认删除选中？')){
			return;
		}
		var arr = [];
		$('input[type=checkbox]').each(function(i,v){
			if(v.checked){
				var tmp_arr = v.value.split('|||||-----|||||');
				arr.push(tmp_arr);
			}
		});
		if(arr.length < 1){
			A('请选择文件！');
			return;
		}
		var idStr = JSON.stringify(arr);
		if(!idStr){
			return;
		}
		var data = {
			type:'delSelect',
			idStr:idStr
		}
		AjaxBefore(data,function(res){
			var tmp = _checkJsonFormat(res); //检测JSON格式
			if(tmp.stat == 'ok'){
				A('操作成功！');
				_clearSessData();	//清除相关sess缓存数据
				location.reload();
			}else{
				if(tmp.stat == 'err3'){
					A('请选择文件！');
				}else{
					A('操作异常！');
				}
			}
		});
	});

	_getUseCapacity();	//获取并显示容量

});	


//获取并显示容量 
function _getUseCapacity(){
	var view = 0;
	$('#capacity').text(sessionStorage.capacity + 'G');	//显示用户总容量

	if(sessionStorage.useCapacity){
		if(view)A('getUseCapacity sess');
		$('#ucapacity').text(sessionStorage.useCapacity);
		return;
	}

	var cachePath = '../cache/capacity/'+sessionStorage.account;
	Ajax({},function(cache){
		if(!cache || !/^{.*}$/.test(cache)){
			var data = {
				type:'getUseCapacity'
			}
			AjaxBefore(data,function(res){
				if(view)A('getUseCapacity after');
				var tmp = _checkJsonFormat(res); //检测JSON格式
				_viewCapacity(tmp.ucapacity);
			});
		}else{
			if(view)A('getUseCapacity cache');
			var tmp_cache = JSON.parse(cache);
			_viewCapacity(tmp_cache.ucapacity);
		}
	},cachePath,1);

}


function _viewCapacity(capacity){
	var ucapacity = parseFloat(capacity);
	sessionStorage.useCapacity2 = ucapacity;
	var res = _getSize(ucapacity);
	$('#ucapacity').text(res);
	sessionStorage.useCapacity = res;
}


</script>

